/**
 * 菜单响应DTO
 * 作者：GodMainCode
 * 创建时间：2024-01-17
 * 修改时间：2024-01-17
 * 修改人：GodMainCode
 */

import { ApiProperty } from '@nestjs/swagger';

export class MenuMetaDto {
  @ApiProperty({ description: '菜单标题' })
  title: string;

  @ApiProperty({ description: '菜单图标', required: false })
  icon?: string;

  @ApiProperty({ description: '是否隐藏菜单', required: false })
  hideMenu?: boolean;

  @ApiProperty({ description: '是否隐藏面包屑', required: false })
  hideBreadcrumb?: boolean;

  @ApiProperty({ description: '是否隐藏子菜单', required: false })
  hideChildrenInMenu?: boolean;

  @ApiProperty({ description: '当前激活的菜单', required: false })
  currentActiveMenu?: string;

  @ApiProperty({ description: '排序号', required: false })
  orderNo?: number;
}

export class MenuResponseDto {
  @ApiProperty({ description: '菜单ID' })
  id: number;

  @ApiProperty({ description: '菜单名称' })
  name: string;

  @ApiProperty({ description: '路由路径' })
  path: string;

  @ApiProperty({ description: '组件路径', required: false })
  component?: string;

  @ApiProperty({ description: '重定向路径', required: false })
  redirect?: string;

  @ApiProperty({ description: '父级ID', required: false })
  parentId?: number;

  @ApiProperty({ type: MenuMetaDto })
  meta: MenuMetaDto;

  @ApiProperty({ type: [MenuResponseDto], required: false })
  children?: MenuResponseDto[];
} 